package civicinity.ist.psu.edu.share;

import android.graphics.drawable.Drawable;
import android.widget.ProgressBar;

import civicinity.ist.psu.edu.R;
import civicinity.ist.psu.edu.utils.CivicinityDrawableManager;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.OverlayItem;

public class CivicinityOverlayItem extends OverlayItem {
	private Drawable marker = null;
	private boolean isHeart = false;
	private Drawable heart = null;
	private int mShareID = 0;
	private int mCommentCnt = 0;
	private int mIsLike = 0;

	
	public CivicinityOverlayItem(GeoPoint pt, int id, String name, String snippet,
			int commentCnt, int isLike,
			Drawable marker, Drawable heart) {
		super(pt, name, snippet);
		mShareID = id;
		mCommentCnt = commentCnt;
		mIsLike = isLike;
		this.marker = marker;
		this.heart = heart;
	}
		
	@Override
	public Drawable getMarker(int stateBitset) {
		Drawable result = (isHeart ? heart : marker);
		
		setState(result, stateBitset);
	
		return(result);
	}
	
	public void toggleHeart() {
		isHeart=!isHeart;
	}
	
	public int getCommentCnt() {
		return mCommentCnt;
	}
	
	public int getIsLike() {
		return mIsLike;
	}
}	

